module.exports = function ($scope, $stateParams, $location, toaster){

    $scope.url = $location.$$protocol + '://' + $location.$$host + '/register.html?area_id=42&cid=' + $scope.info.company_id + '&rid=' + $stateParams.code;

    $scope.copyURL = function () {
        var e = $('#myBtn')[0];
        e.select(); 
        if(document.execCommand("Copy")){
            toaster.success({'title': '', 'body': '复制成功'});
        } else {
            toaster.error({'title': '', 'body': '复制失败'});
        }
	}

};